A well system (e.g., an oil or gas well) is typically drilled for extracting hydrocarbons from a subterranean formation. Not every well system, however, contains enough hydrocarbons to make it commercially viable to continue operating the well. Once a wellbore has been drilled, operators of the well system can determine whether the well system has a commercially productive level of hydrocarbons by performing formation tests. Formation tests can establish formation pressure, permeability, formation fluid characteristics, and other useful information about the well system. Formation-testing tools can include a pump, which can be used to withdraw extraneous fluids (e.g., mud) from a formation. The pump can also be used to withdraw the targeted hydrocarbons from a formation for testing. The pump can be a double-acting pump. Check valves can be used to control the flow of the fluids through the pump. For example, check valves can cause fluid to enter one side of the pump and exit from the other side of the pump. Typically, fluids passing through the check valve can contain sand, dirt, and other debris that can become stuck in the check valves, affecting the performance of the pump. Accordingly, it can be challenging to pump fluids from a formation efficiently.